<?include("../../config/config.php");
$DM->loadClass("tracker","company");
// create and instance class
$object_company = new company();
$object_company->getList();
?>
<html>
<head>
<title>company</title>
<link href="../../resource/includes/css/admin.css" type="text/css" rel="stylesheet" rev="stylesheet" />
<script>
function apagar(_id){
	if (confirm('Erase this item from the system?')){
		window.location.href='company.delete.php?id='+_id+'&apagar=apag';
	}
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#efefef"  width='600'>
	<tr align=left>
		<td height='25' colspan='4' class='titleTd'>LISTA DE COMPANY</td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='4' align='center'><a href=company.edit.php class='mainAction'>ADICIONAR NOVA company</a></td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='4' bgcolor="#FFFFFF"></td>
	</tr>		
	<tr>		<td class='titleTd' align='center'>ID</td>
		<td class='titleTd' align='center'>CNPJ</td>
		<td class='titleTd' align='center'>Active</td>
		<td class='titleTd' align='center'>Actions</td>
	</tr>
<?
for ($i=0;$i<count($object_company->lista);$i++){
$line = $line!="line1"?"line1":"line2";
	$object_company->id_company=$object_company->lista[$i][id_company];
	$object_company->getById();
	echo "<TR>
<td align='center' class='<?=$line?>'>$object_company->id_company</td>
<td align='center' class='<?=$line?>'>$object_company->txt_cnpj</td>
<td align='center' class='<?=$line?>'>$object_company->bol</td>
		<td align='center'>
		<a class='minorAction' href='company.edit.php?id=$object_company->id_company'>editar</a> - <a class='minorAction' href='javascript:apagar($object_company->id_company);'>apagar</a> - 
		<a class='minorAction' href='site.list.php?idc=$object_company->id_company'>SITES</a>

</td>
	";
	echo "</TR>";
}
?>
</table>
<script src="../../track.php?st=1"></script></body></html>